<?php

class DB {

    function connect() {
        $connection = mysql_connect("localhost", "root", "vertrigo");
        mysql_select_db("db_web1", $connection);
        mysql_query("SET character_set_results=utf8", $connection);
        $ret = mysql_query("SELECT * FROM bd_index", $connection);
        $data = array();
        while ($row = mysql_fetch_assoc($ret)) {
            $data[] = $row;
        }
        return $data;
    }

}

?>
